﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GetErrorListener : AndroidJavaProxy
{
    Action<ErrorType, string> callback;
    public GetErrorListener(Action<ErrorType, string> callback) : base(AndroidBridge.packageName + ".GetErrorListener")
    {
        this.callback = callback;
    }

    public void GetError(int code, string error)
    {
        callback?.Invoke((ErrorType)code, error);
    }
}

public enum ErrorType 
{
    Log,
    Warning,
    IllegalDevice
}